Completed
Push — master ( 57140e...ff6124 )
by Jan
14s queued 12s
created

util.ts ➔ validateLanguage   A

Complexity

Conditions 2

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 2
1
2
export function validateLanguage(language: string) {
3
    if (language.length !== 3) {
4
        throw new TypeError(
5
            "Language string length must be 3, see ISO 639-2 codes"
6
        )
7
    }
8
    return language
9
}
10